<?php 
$args = null;
$num_post		= 4;
$post_type		= 'services'; 
$orderby		= 'date';
$order			= 'DESC';
$meta_key		= $wpdb->prefix.'display';
$meta_value		= 'display';
$args = db_query_all_post_in_post_type($num_post, $post_type, $orderby, $order, $meta_key, $meta_value);					
$query = new WP_Query($args);
?>

<div class="our-service">
                    	<span class="icon-our-service"></span><h3>Our Services</h3>
                        <ul>                        	
                            <?php                     
		                    if($query->have_posts())
		                    {
		                    	while ($query->have_posts())
		                    	{
		                    		$query->the_post();
		                    		$post_id = get_the_ID();
		                    		$title = get_the_title($post_id);
		                    		$perlink = get_permalink($post_id);
		                    		$thumbnail = db_get_post_meta($post_id, $wpdb->prefix.'thumbnail');
		                    		$alt = db_get_alt_attachment_id($post_id, $wpdb->prefix.'thumbnail');
		                    		if(!$alt)
		                    			$alt = db_vietnamese_slug($title);
		                    		?>
		                    		<li>
		                            	<div class="bg-our-service"><a href="<?php echo $perlink;?>">
		                            	<img src="<?php echo $thumbnail;?>" alt="<?php echo $alt;?>" /></a></div>
		                                <h4><a href="<?php echo $perlink;?>"><?php echo db_shortDesc($title, 20);?></a></h4>
		                                <p><?php echo db_shortDesc(get_the_content(), 120);?></p>
		                            </li>
		                    		<?php 	
		                    	}
		                    	wp_reset_query();
		                    }
		                    else 
		                    {
		                    	echo 'No found!';
		                    }
		                    ?>                           
                        </ul>
                        <div class="clear"></div>
                    </div>